/*
Date:20210602 22:13PM
key:长的那个走到尾巴j都没走到尾巴就肯定不行了
*/
class Solution {
public:
    bool isSubsequence(string s, string t) 
    {
        //s在t中
        const int m=s.size();
        const int n=t.size();
        int j=0,i=0;
        while(j<m)
        {
            if(i==n){return 0;}
            if(s[j]==t[i])
            {
                j++;
            }
            i++;

        }
        return 1;
    }
};